<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <title>佳运通综合平台</title>
  <meta name="renderer" content="webkit|ie-comp|ie-stand">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport"
        content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <meta http-equiv="Cache-Control" content="no-siteapp"/>
  <link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon"/>
  <link rel="stylesheet" href="/static/css/font.css">
  <link rel="stylesheet" href="/static/css/weadmin.css">
  <script type="text/javascript" src="/static/lib/layui/layui.js" charset="utf-8"></script>
</head>

<body>
<!-- 顶部开始 -->
<div class="container">
  <div class="logo">
    <a href="javascript:;"><img src="/static/images/logo.png" class="layui-nav-img"><span>佳运通科技</span></a>
  </div>
  <div class="left_open">
    <i title="展开左侧栏" class="layui-icon layui-icon-shrink-right"></i>
  </div>
  <ul class="layui-nav right" lay-filter="">
    <li class="layui-nav-item">
      <a href="javascript:;"><span class="layui-icon layui-icon-username"></span><span class="username"></span></a>
      <dl class="layui-nav-child">
        <!-- 二级菜单 -->
        <dd>
          <a onclick="WeAdminShow('个人信息-修改密码','/member/password',500,500)">更改密码</a>
        </dd>
        <!--<dd>-->
          <!--<a href="./login.html">切换帐号</a>-->
        <!--</dd>-->
        <dd>
          <a class="loginout" href="/login">退出</a>
        </dd>
      </dl>
    </li>
  </ul>
  <div class="fullScreen">
    <i title="全屏" class="layui-icon layui-icon-screen-full"> </i>
  </div>
</div>
<!-- 顶部结束 -->
<!-- 中部开始 -->
<!-- 左侧菜单开始 -->
<div class="left-nav">
  <div id="side-nav"></div>
</div>
<!--<div class="x-slide_left"></div>-->
<!-- 左侧菜单结束 -->
<!-- 右侧主体开始 -->
<div class="page-content">
  <div class="layui-tab tab" lay-filter="wenav_tab" id="WeTabTip" lay-allowclose="true">
    <ul class="layui-tab-title" id="tabName">
      <li lay-id=""></li>
    </ul>
    <div class="layui-tab-content">
      <div class="layui-tab-item layui-show">
        <iframe src='' frameborder="0" scrolling="yes" class="weIframe" id="mjyt"></iframe>
      </div>
    </div>
  </div>
</div>
<div class="page-content-bg"></div>
<!-- 右侧主体结束 -->
<!-- 中部结束 -->
<!-- 底部开始 -->
<!--		<div class="footer">-->
<!--			<div class="copyright">Copyright ©2019 &nbsp;佳运通电子科技(昆山)有限公司</div>-->
<!--		</div>-->
<!-- 底部结束 -->
<script type="text/javascript">
  layui.config({
    base: './js/' ,
    version: 'v1.0'
  }).extend({ //设定模块别名
    admin: 'admin'
    , menu: 'menu'
  });
  layui.use(['jquery', 'admin', 'menu'], function () {
    var $ = layui.jquery,
        admin = layui.admin,
        menu = layui.menu;
    $(function () {
      var login = JSON.parse(sessionStorage.getItem("login"));
      if(login == null){
        window.location.href = '/login';
        sessionStorage.clear();
        return false;
      }else{
        if(login === true){
          var menuJson = JSON.parse(sessionStorage.getItem('leftMenu'));
          var nickName = JSON.parse(sessionStorage.getItem('userInfos')).nickName;
          $(".username").html(nickName);
          menu.getMenuJYT(menuJson);
          // 设置打开第一个tab
          var index = menuJson.list.filter(item => item.menuUrl === '/dashboard')[0];
          var firstLi = $('.page-content .layui-tab-title li:first-child');
          firstLi.attr('lay-id', index.menuId);
          firstLi.text(index.menuTitle);
          firstLi.addClass('layui-this');
          $('.page-content iframe').attr('src', index.menuUrl);
          sessionStorage.setItem('curMenu', JSON.stringify({
            id: index.menuId,
            title: index.menuTitle,
            url: index.menuUrl
          }));
          return false;
        }else{
          window.location.href = '/login';
          sessionStorage.clear();
          return false;
        }
      }
    });
  });

</script>
</body>
<!--Tab菜单右键弹出菜单-->
<ul class="rightMenu" id="rightMenu">
  <li data-type="fresh">刷新</li>
  <li data-type="current">关闭当前</li>
  <li data-type="other">关闭其它</li>
  <li data-type="all">关闭所有</li>
</ul>
</html>
